﻿
using System;
using System.Collections.Generic;
using System.Text;

namespace CMN.Entity
{
    /// <summary>
    /// 权限类
    /// </summary>
    public class Permission
    {
        #region "Private Variables"
        private int _PermissionId = 0;
        private string _PageCode;
        private string _PageCodeName;
        private List<Sys_PermissionItem> _ItemList = new List<Sys_PermissionItem>();
        #endregion

        #region "Public Variables"
        /// <summary>
        /// 模块Id
        /// </summary>
        public int PermissionId
        {
            get { return _PermissionId; }
            set { _PermissionId = value; }
        }

        /// <summary>
        /// 页面地址
        /// </summary>
        public string PagePath { get; set; }

        /// <summary>
        /// 模块代码
        /// </summary>
        public string PageCode
        {
            get
            {
                return _PageCode;
            }
            set
            {
                _PageCode = value;
            }
        }
        /// <summary>
        /// 模块名称
        /// </summary>
        public string PageCodeName
        {
            get
            {
                return _PageCodeName;
            }
            set
            {
                _PageCodeName = value;
            }
        }

        /// <summary>
        /// 权限文件列表
        /// </summary>
        public List<Sys_PermissionItem> ItemList
        {
            get
            {
                return _ItemList;
            }
            set
            {
                _ItemList = value;
            }
        }
        #endregion
    }

    ///// <summary>
    ///// 权限详细类
    ///// </summary>
    //public class PermissionItem
    //{
    //    #region "Private Variables"
    //    private string _Item_Name;
    //    private int _Item_Value;
      
    //    #endregion

    //    #region "Public Variables"
    //    /// <summary>
    //    /// 权限名称
    //    /// </summary>
    //    public string Item_Name
    //    {
    //        get
    //        {
    //            return _Item_Name;
    //        }
    //        set
    //        {
    //            _Item_Name = value;
    //        }
    //    }
    //    /// <summary>
    //    /// 权限值
    //    /// </summary>
    //    public int Item_Value
    //    {
    //        get
    //        {
    //            return _Item_Value;
    //        }
    //        set
    //        {
    //            _Item_Value = value;
    //        }
    //    }

       
    //    #endregion
    //}

    #region "权限类型"
    /// <summary>
    /// 权限类型
    /// </summary>
    public enum PopedomType
    {
        
        /// <summary>
        /// 列表/查看
        /// </summary>
        List = 2,
        /// <summary>
        /// 查看详情
        /// </summary>
        Look = 4,
        /// <summary>
        /// 新增
        /// </summary> 
        Add = 8,
        /// <summary>
        /// 修改
        /// </summary>
        Edit = 16,
        /// <summary>
        /// 删除
        /// </summary>
        Delete = 32,
        /// <summary>
        /// 排序
        /// </summary>
        Orderby = 64,
        /// <summary>
        /// 打印
        /// </summary>
        Print = 128,

        /// <summary>
        /// 搜索
        /// </summary>
        Search=256,
        /// <summary>
        /// 批量删除
        /// </summary>
        DeleteList=512,
        /// <summary>
        /// 访问
        /// </summary>
        Index=1024
        ///// <summary>
        ///// 备用A
        ///// </summary>
        //A = 256,
        ///// <summary>
        ///// 备用B
        ///// </summary>
        //B = 512,
        ///// <summary>
        ///// 自定义权限1024
        ///// </summary>
        //Custom1024 = 1024,
        ///// <summary>
        ///// 自定义权限2048
        ///// </summary>
        //Custom2048 = 2048,
        ///// <summary>
        ///// 自定义权限4096 
        ///// </summary>
        //Custom4096 = 4096,
        ///// <summary>
        ///// 自定义权限8192
        ///// </summary>
        //Custom8192 = 8192,
        ///// <summary>
        ///// 自定义权限16384
        ///// </summary>
        //Custom16384 = 16384,
        ///// <summary>
        ///// 自定义权限32768
        ///// </summary>
        //Custom32768 = 32768,
        ///// <summary>
        ///// 自定义权限65536
        ///// </summary>
        //Custom65536 = 65536,
        ///// <summary>
        ///// 自定义权限131072
        ///// </summary>
        //Custom131072 = 131072,
        ///// <summary>
        ///// 自定义权限262144
        ///// </summary>
        //Custom262144 = 262144,
        ///// <summary>
        ///// 自定义权限524288
        ///// </summary>
        //Custom524288 = 524288,
        ///// <summary>
        ///// 自定义权限1048576
        ///// </summary>
        //Custom1048576 = 1048576,
        ///// <summary>
        ///// 自定义权限2097152
        ///// </summary>
        //Custom2097152 = 2097152,
        ///// <summary>
        ///// 自定义权限4194304
        ///// </summary>
        //Custom4194304 = 4194304,
        ///// <summary>
        ///// 自定义权限8388608
        ///// </summary>
        //Custom8388608 = 8388608,
        ///// <summary>
        ///// 自定义权限16777216
        ///// </summary>
        //Custom16777216 = 16777216,
        ///// <summary>
        ///// 自定义权限33554432
        ///// </summary>
        //Custom33554432 = 33554432,
        ///// <summary>
        ///// 自定义权限67108864
        ///// </summary>
        //Custom67108864 = 67108864,
        ///// <summary>
        ///// 自定义权限134217728
        ///// </summary>
        //Custom134217728 = 134217728,
        ///// <summary>
        ///// 自定义权限268435456
        ///// </summary>
        //Custom268435456 = 268435456,
        ///// <summary>
        ///// 自定义权限536870912
        ///// </summary>
        //Custom536870912 = 536870912
    }
    #endregion
}
